<?php
$host = "localhost";
$user = "root";
$pass = "";
$banco = "cadastroperfil";
$connection = mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($banco) or die(mysql_error());
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />	
<title>Atualizar Perfil</title>
<link href="css/style.css" rel="stylesheet" media="screen">
<script src="ValidaCampos.js"></script>
</head>	
<body background="">
<?php
$id = $_GET['id'];
$sql = mysql_query( "SELECT * FROM perfis where id='$id'");
$indice = mysql_fetch_assoc($sql);
?>	
	<h1>ATUALIZAR PERFIL</h1>
	<form name="atualizar_perfil" onsubmit="return validar(this);" method="post" action="UpdatePerfil.php">	
		<input type="hidden" name="id" value="<?php echo $indice['id']; ?>"/><br/><br/>
		<label>Nome:</label> <input type="text" name="nome" value="<?php echo $indice['nome']; ?>"/><br/><br/>
		<label>Endereço:</label> <input type="text" name="endereco" value="<?php echo $indice['endereco']; ?>"/><br/><br/>
		<label>Idade: </label><input type="number" name="idade" min="10" max="70" value="<?php echo $indice['idade']; ?>"/><br/><br/>	
		<label>Telefone:</label> <input type="tel" name="telefone" value="<?php echo $indice['telefone']; ?>"/><br/><br/>
		<label>E-mail:</label> <input type="text" name="email" value="<?php echo $indice['email']; ?>"/><br/><br/>
		<label>Data Base do Ciclo </label> <input type="date" name="data" value="<?php echo $indice['data']; ?>"/><br/><br/>
		<label>Rede Social </label><input type="text" name="redesocial" value="<?php echo $indice['redesocial']; ?>"/><br/><br/>
		<input type="submit" value="Atualizar">
	</form>	
	<br/><br/>
	<a href="index.php"><img src="images/inicio.jpg" title="Tela Inicial"/></a> 
	<a href="PesquisarPerfil.php"><img src="images/pesquisar.jpg" title="Pesquisar"/></a>  
</body>	
</html>